<template>
  <div class="header-wrapper">
    <div class="back" @click="back">
      <i></i>
    </div>
    <div class="title">{{title}}</div>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: '登录'
    }
  },
  methods: {
    back () {
      this.$router.back()
    }
  }
}
</script>
<style lang="scss" scoped>
@import "./../../assets/css/mixin.scss";
.header-wrapper {
  width: 100%;
  height: 128px;
  background: rgba(255, 255, 255, 1);
  box-sizing: border-box;
  position: relative;
  border-bottom: 1px solid #ccc;
  .back {
    height: 100%;
    @include vCenter();
    left: 24px;
    vertical-align: middle;
    i {
      display: inline-block;
      width: 50px;
      height: 50px;
      background: url("./../../assets/images/back.png");
      background-size: cover;
    }
  }
  .title {
    width: 100%;
    line-height: 128px;
    font-size: 36px;
    font-family: PingFang SC;
    font-weight: 500;
    color: rgba(68, 68, 68, 1);
    text-align: center;
  }
}
</style>
